﻿using System;
using System.Data;
using System.Data.OleDb;

namespace OurCouse.DBTask
{
    public class DBConnectionFactory
    {
        #region 类构造器
        /// <summary>
        /// 类默认构造器
        /// </summary>
        private DBConnectionFactory()
        {
        }
        #endregion

        /// <summary>
        /// 创建数据库连接
        /// </summary>
        /// <returns></returns>
        public static OleDbConnection Create()
        {
            return new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\C#\OurCouse\WebApp\App_Data\MyDB.mdb");
        }
    }
}
